/* 病历管理页面样式 */

/* 主容器样式 */
#medical-records-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 操作栏样式 */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.actions-bar .filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filters .search-box {
    position: relative;
    width: 280px;
}

.filters .search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.filters .search-box input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.filters .search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.filters .search-box button:hover {
    color: var(--color-primary);
}

.filter-select {
    padding: 10px 30px 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    background-color: var(--color-white);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    transition: border-color 0.2s;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* 表格容器样式 */
.table-container {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: auto;
    flex: 1;
    margin-bottom: 20px;
}

/* 数据表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.data-table thead {
    background-color: var(--color-bg-light);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 16px;
    font-weight: 600;
    color: var(--color-text-dark);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.data-table th:first-child {
    padding-left: 20px;
}

.data-table th:last-child {
    padding-right: 20px;
}

.data-table tbody tr {
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: var(--color-bg-hover);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text);
}

.data-table td:first-child {
    padding-left: 20px;
}

.data-table td:last-child {
    padding-right: 20px;
}

/* 状态标签样式 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.draft {
    background-color: var(--color-gray-light);
    color: var(--color-gray-dark);
}

.status-badge.active {
    background-color: var(--color-success-light);
    color: var(--color-success-dark);
}

.status-badge.archived {
    background-color: var(--color-warning-light);
    color: var(--color-warning-dark);
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.action-btn.view {
    color: var(--color-info);
}

.action-btn.edit {
    color: var(--color-warning);
}

.action-btn.delete {
    color: var(--color-danger);
}

.action-btn:hover {
    background-color: var(--color-bg-light);
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.pagination-btn, .pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background-color: var(--color-white);
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn:not(:disabled):hover, 
.pagination-number:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination-number.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 5px;
}

/* 模态框内容样式 */
.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

/* 病历详情模态框样式 */
.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border-light);
}

.record-id {
    font-size: 14px;
}

.record-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.record-status.draft {
    background-color: var(--color-gray-light);
    color: var(--color-gray-dark);
}

.record-status.active {
    background-color: var(--color-success-light);
    color: var(--color-success-dark);
}

.record-status.archived {
    background-color: var(--color-warning-light);
    color: var(--color-warning-dark);
}

.record-section {
    margin-bottom: 24px;
}

.record-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-dark);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-item .label {
    font-size: 13px;
    color: var(--color-text-light);
    margin-right: 5px;
}

.info-item .value {
    font-weight: 500;
    color: var(--color-text-dark);
}

.record-text {
    background-color: var(--color-bg-light);
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    white-space: pre-wrap;
}

.record-footer {
    margin-top: 24px;
    padding-top: 15px;
    border-top: 1px solid var(--color-border-light);
}

.record-timestamps {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.timestamp {
    font-size: 13px;
}

.timestamp .label {
    color: var(--color-text-light);
    margin-right: 5px;
}

.timestamp .value {
    color: var(--color-text);
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .actions-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .actions-bar .filters {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .data-table {
        font-size: 13px;
    }
    
    .data-table th, 
    .data-table td {
        padding: 12px 8px;
    }
    
    .filters .search-box {
        width: 100%;
    }
    
    .filters .filter-select {
        flex: 1;
    }
    
    .modal-content {
        width: 95%;
    }
} 